﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;
using System.Data;
namespace FubiManger.Controls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class fresh_statisticscontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public fresh_statisticscontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        public string mid { get; set; }

        private void fresh_statisticscontrol_Load(object sender, EventArgs e)
        {
            List<ms_fresh_statistics> stlist = fresh_statisticsDal.Querycount(mid);
            DataTable table = new DataTable();
            table.Columns.Add("proname");
            table.Columns.Add("count");
            for (int i = 0; i < stlist.Count; i++)
            {
                table.Rows.Add(stlist[i].fs_fgname, "x "+stlist.Count);
            }
            lvstatis.DataSource = table;
            lvstatis.DataBind();
        }
    }
}